#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton * Btn = new QPushButton("按钮",this);
    Btn->move(200,200);
    connect(Btn,&QPushButton::clicked,this,&Widget::Myslots);
    disconnect(Btn,&QPushButton::clicked,this,&Widget::Myslots);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::Myslots()
{
    this->setWindowTitle("Hello world");
}
